1. Field
The field generally relates to just-in-time compiling graphics shader instructions during execution of an application.
2. Background
One of the crucial tests of computer graphics hardware is programmed execution speed. For example, if graphics hardware is not able to execute portions of an application to display a video or images that update in real time, the display quality might suffer, such as by not appearing smooth and appealing to a viewer. Specifically, a motion of objects which are present in a current frame of image or video data, may have an inappropriate shape, color, or may have a “jerky” transition to a subsequent frame.
Although various factors can affect the execution speed of a program, one of the most important factors is the level of optimization of execution provided by a just-in-time (JIT) compiler of graphics shaders. A graphics “shader” may be described as a sequence, series, order, region, and/or portion of graphics shader code, instructions, programs, and/or software. In many cases, the level of optimization that can be achieved is largely determined by the memory layout of the shader code instructions in physical memory prior to compiling. In many memory layouts, prior to compiling, the original order of the instructions are laid out sequentially, in a single tree structure, and/or in an “n-ary tree data structure.” However, these layouts may not necessarily provide the most efficient order for a JIT compiler to compile the shader code into machine executable code. Thus, it may be desired to re-order shader code instructions from an original order (e.g., the order or sequence of the instructions in the program or application) into a re-ordered order that may be compiled more efficiently, while minimizing the amount of memory required to perform such re-ordering.